package edu.gyc.hishiro.controller;


import edu.gyc.hishiro.model.SysPermission;
import edu.gyc.hishiro.model.SysRole;
import edu.gyc.hishiro.service.SysPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ls
 * @since 2021-01-04
 */
@Controller
@RequestMapping("/perm")
public class SysPermissionController {

    @Autowired
    SysPermissionService permissionService;
    @RequestMapping("/query")
    public String query(Model model) {
        List<SysPermission> perms=permissionService.list();
        model.addAttribute("perms", perms);
        return "/admin/perms";
    }
}

